#include <stdio.h>

int is_exist(char ch, char arr[])
{
	int i = 0;
	while (arr[i])
	{
		if (ch == arr[i])
		{
			return 1;
		}
		i++;
	}
	return 0;
}

int main()
{
	char arr1[101] = { 0 };
	char arr2[101] = { 0 };

	gets(arr1);
	gets(arr2);
	int i = 0;

	while (arr1[i])
	{
		if (is_exist(arr1[i], arr2) == 0)
		{
			printf("%c", arr1[i]);
		}
		i++;
	}
	return  0;
}